// 导入vueRouter
import Vue from "vue";
import VueRouter from "vue-router";
import shouYe from "@/components/shouYe";
import changPing from "@/components/changPing";

// 使用路由
Vue.use(VueRouter)
// 创建Vue router实例
const router = new VueRouter({
    path: "/",
    redirect: "shouYe", //默认显示推荐组件(路由的重定向)
    mode: "history",
    routes :[
        {
            path: "/shouYe",
            name:'shouYe',
            component: shouYe,
        },
        {
            path: "/changPing",
            name:'changPing',
            component: changPing
        },
    ]
})

//5.导入路由实例
export default router
